rolesystem.roles.game
Class Player

java.lang.Object
  extended by rolesystem.roles.game.Player

public abstract class Player
extends java.lang.Object

This role is the player of a generic game. Keywords: game, player.


Field Summary
static KnownEvent KE_accept
          A manager notifies that I can play.
static KnownEvent KE_gameLost
          A manager notifies that I have lost the game.
static KnownEvent KE_gameOver
          A manager notifies that the game is over.
static KnownEvent KE_gameWon
          A manager notifies that I have won the game.
static KnownEvent KE_notifyKind
          A manager notifies the kind of the game.
static KnownEvent KE_notifySituation
          A manager notifies the current situation of the game.
static KnownEvent KE_refuse
          A manager notifies that I cannot play.
static KnownEvent KE_refuseMove
          A manager refuse my move.
static KnownEvent KE_requestMove
          A manager requests to make my move.
static KnownEvent KE_talk
          Another player talks.
static java.lang.String ROLE_ID
          Role identifier.
 
Constructor Summary
Player()
           
 
Method Summary
static RoleAction askKind(int addressee)
          Asks the kind of the game.
static RoleAction giveUp(int addressee)
          Gives up the current game.
static RoleAction Move(int addressee, java.io.Serializable content)
          Makes a move.
static RoleAction reqPlay(int addressee)
          Requests to play.
static RoleAction talk(int addressee, java.lang.String content)
          Talks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE_ID

public static final java.lang.String ROLE_ID
Role identifier.

See Also:
Constant Field Values

KE_notifyKind

public static final KnownEvent KE_notifyKind
A manager notifies the kind of the game. Sender role: Manager Content: Kind of the game.


KE_accept

public static final KnownEvent KE_accept
A manager notifies that I can play. Sender role: Manager


KE_refuse

public static final KnownEvent KE_refuse
A manager notifies that I cannot play. Sender role: Manager


KE_notifySituation

public static final KnownEvent KE_notifySituation
A manager notifies the current situation of the game. Sender role: Manager Content: Situation of the game.


KE_requestMove

public static final KnownEvent KE_requestMove
A manager requests to make my move. Sender role: Manager


KE_refuseMove

public static final KnownEvent KE_refuseMove
A manager refuse my move. Sender role: Manager


KE_gameWon

public static final KnownEvent KE_gameWon
A manager notifies that I have won the game. Sender role: Manager


KE_gameLost

public static final KnownEvent KE_gameLost
A manager notifies that I have lost the game. Sender role: Manager


KE_gameOver

public static final KnownEvent KE_gameOver
A manager notifies that the game is over. Sender role: Manager


KE_talk

public static final KnownEvent KE_talk
Another player talks. Sender role: Player Content: Message.

Constructor Detail

Player

public Player()
Method Detail

askKind

public static RoleAction askKind(int addressee)
Asks the kind of the game.

Parameters:
addressee - Manager

reqPlay

public static RoleAction reqPlay(int addressee)
Requests to play.

Parameters:
addressee - Manager

Move

public static RoleAction Move(int addressee,
                              java.io.Serializable content)
Makes a move.

Parameters:
addressee - Manager
content - Move.

giveUp

public static RoleAction giveUp(int addressee)
Gives up the current game.

Parameters:
addressee - Manager

talk

public static RoleAction talk(int addressee,
                              java.lang.String content)
Talks.

Parameters:
addressee - Player
content - Message.